﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web.Views.Common
{
    public partial class TrainNumberSearch : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
            if (Request["TrainNumber"] != null)
            {
                spanTrainNumber.InnerText = Request["TrainNumber"].ToString();
                this.Title ="容易订票网 车次  "+Request["TrainNumber"].ToString();
            }
        }

        protected void dgvTrainNumber_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
        if (e.Item.ItemType == ListItemType.Item) 
        {

             e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='red'") ;

            e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='linen'");
        }

        if (e.Item.ItemType == ListItemType.AlternatingItem) 
        {

            e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor='yellow'");
            e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor='lavender'");

        }


        }
    }
}
